﻿@inherits RenderViewPage
@using System.Web.Mvc.Html;
@using Umbraco.Cms.Web;
@using PBDesk.com.Extension.UmbHelper;
@using PBDesk.com.Extension.Articles;
@{
	Layout = "_PBDeskLayout.cshtml";
	OArticle art = null;
	dynamic artOfDay = MyHelper.GetArticleOfTheDay(DynamicModel);		    
	if (artOfDay != null && artOfDay is OArticle)
	{
		art = artOfDay;
	}
	else
	{
		art = new OArticle(artOfDay);
		art.Author = new OAuthor(Umbraco.GetDynamicContentById(artOfDay.author));
		art.ContentProvider = new OContentProvider(Umbraco.GetDynamicContentById(artOfDay.contentProvider));
		PBDesk.com.Extension.WebHelper.CacheManager.SetArticleOfTheDay(art);
	}	
	
}

@section head
{

}

@section TopBanner
{

}

@section BodyTop
{
@Umbraco.RenderMacro("breadCrumb")
}

@section BodyBottom
{

}

@section GrayBanner
{

}

@section BottomBanner
{

}

<div id="art-content-wrapper" style="background:none">
	<div id="art-main-wrapper">
		<div id="artmain">
			<div id="contents">
				<div id="left">
					<h1 class="servicetitle">Article Of The Day</h1>
					<div id="portfolio">
						<br />
						<div class="site">
						<p><b>@art.MetaTitle</b><br>@art.Title</p>
						<div class="layer">
							<span><a href="@art.Link" target="_blank"><img src="http://cdn.pbdesk.com/images/social/rss_blue.png" alt="Read Article" height="33" width="33"></a></span>
						</div>
						<div class="portfolio_image">
							<b>Today's Article:</b><br />
							@art.MetaTitle <br />
							@art.Title <br />
							<p>@Html.Raw(art.Description)</p>
							<p>
								<br />Author: @art.Author.Name
								<br />Published At: @art.ContentProvider.Name
								<br />Tags: @Html.Raw(art.Tags)
							</p>
							<p>
								<a href="@art.Link" target="_blank">Read Article</a>
							</p>
						</div>
					 </div>
					 <br/>
				</div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div><!-- end art-main-wrapper -->
	<div id="art-sidebar-wrapper">
		<div id="artsidebar" class="artsidebar">
				   
				   @Umbraco.RenderMacro("sidebarMoreTechNews")
				   @Umbraco.RenderMacro("sidebarMoreArticles")
			<div class="artwidget">
				<h2 class="art-sidebar-header">Related Links</h2>
				<div class="art-widget-content">
					<div>
						@Umbraco.Field("sidebarCallout", removeParagraphTags: true)
					</div>
				</div>
			</div>
			<div class="artwidget">
				<h2 class="art-sidebar-header">News Updates</h2>
				<div class="art-widget-content">
					<div>
						<a href="/technews/scitech/">Sci &amp; Tech</a>   <a href="/technews/csharp/">C#</a>   <a href="/technews/aspnet/">ASP.Net</a>   <a href="/technews/silverlight/">Silverlight</a>   <a href="/technews/vbnet/">VB.Net</a>   <a href="/technews/msnet/">Microsoft.Net</a>   <a href="/technews/umbraco/">Umbraco</a>   
					</div>
				</div>
			</div>
			<div class="artwidget">
				<h2 class="art-sidebar-header">More Articles</h2>
				<div class="art-widget-content">
					<div>
						<a href="/articles/csharp/">C#</a>   <a href="/articles/aspnet/">ASP.Net</a>   <a href="/articles/umbraco/">Umbraco</a>   <a href="/articles/general/">General</a>   <a href="/articles/toolsutils/">Tools &amp; Utils</a>   
					</div>
				</div>
			</div>
		</div><!-- end art-sidebar-->
	</div><!-- end art-sidebar-wrapper -->
	<div class="clear">&nbsp;</div>
</div>